<extend name="Public/base"/>

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>展会列表</h2>
    </div>
    <div class="clearfix">
        <div class="col-xs-10">
             <div class="col-xs-10">
             <!-- 预留空位 -->                    
            </div>

        </div>   
        <script>
            function post_select_form(){
                var ids=$('.ids').serialize();
                var title="{:L('_USER_GROUP_SELECT_')}";
                $.post("{:U('user/changeGroup')}",ids,function(msg){
                    (new $.zui.ModalTrigger({custom: msg,title:title})).show();
                })
            }
        </script>

        <!-- 高级搜索 -->
        <div class="search-form  col-xs-2 text-right">
            <div class="input-group">
                <input type="text" name="patentname" class="search-input form-control" value="{:I('patentname')}"
                       placeholder="请输入展会名称或编号">
                                 <span class="input-group-btn">  <a class="btn btn-default" href="javascript:;" id="search" url="{:U('index')}"><i class="icon-search"></i></a></span>
            </div>
        </div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table with-padding">
        <table class="table table-bordered table-striped ">
            <thead>
            <tr>
                <th class="">编号</th>
                <th class="">展会名称</th>            
                <th class="">展会类型</th>
                <th class="">报名截止时间</th>
                <th class="">展会时间</th>
                <th class="">参展项目数</th>
                <th class="">参展需求数</th>
                <th class="">展会状态</th>
                <th class="">操作</th>

            </tr>
            </thead>
            <tbody>
            <notempty name="_list">           
               <volist name="_list" id="vo">
           
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.zname}</td>                   
                         <!-- <if condition="$vo['type']==1">
                           <td>专题展会</td>
                        </if>
                         <if condition="$vo['type']==2">
                           <td>区域性展会</td>
                        </if>  -->     
                        <td>{$vo.type}</td>                               
                        <td>{$vo.btime}</td>
                        <td>{$vo.stime}至{$vo.etime}</td>
                        <td>{$vo.numTec}</td>
                        <td>{$vo.numDem}</td>
                        <if condition="$vo['zstatus']==0">
                           <td>报名中</td>
                        </if>
                         <if condition="$vo['zstatus']==1">
                           <td>进行中</td>
                        </if>
                         <if condition="$vo['zstatus']==2">
                           <td>已结束</td>
                        </if>
                        <td>
                        <!-- 报名中的操作按钮 -->
                              <if condition="$vo['zstatus']==0">
                               <a href="{:U('Techolder/myzdetail?id='.$vo['id'])}" class="authorize">详情</a>
                               <a href="{:U('Techolder/zxq?id='.$vo['id'])}" class="authorize">参展需求</a>         
                       		 </if>  
                       		 <!-- 进行中的操作按钮 -->
                       		   <if condition="$vo['zstatus']==1">
                       		    <a href="{:U('Techolder/myzdetail?id='.$vo['id'])}" class="authorize">详情</a> 
                       		    <a href="{:U('Techolder/zxq?id='.$vo['id'])}" class="authorize">参展需求</a>
                       		 </if>  
                       		 <!-- 已结束的操作按钮 -->
                       		   <if condition="$vo['zstatus']==2">
                         		 <a href="{:U('Techolder/myzdetail?id='.$vo['id'])}" class="authorize">详情</a>  
                         		 <a href="{:U('Techolder/zxq?id='.$vo['id'])}" class="authorize">参展需求</a>                      		
                       		 </if>                       
                        </td>

                    </tr>
             
                </volist>
               
                <else/>
                <td colspan="9" class="text-center">暂无信息</td>
            </notempty>
            </tbody>
        </table>
    </div>
    <div class="with-padding">
        {$_page}
    </div>
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>

    <script type="text/javascript">
        //搜索功能
        $("#search").click(function () {
            var url = $(this).attr('url');
            var query = $('.search-form').find('input').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
            query = query.replace(/^&/g, '');
            if (url.indexOf('?') > 0) {
                url += '&' + query;
            } else {
                url += '?' + query;
            }
            window.location.href = url;
        });
        //回车搜索
        $(".search-input").keyup(function (e) {
            if (e.keyCode === 13) {
                $("#search").click();
                return false;
            }
        });
        //导航高亮
        highlight_subnav("{:U('Tecdem/allzhanhui')}");
    </script>
</block>